package com.huarui.company.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.ewaf.framework.dao.impl.BaseDaoImpl;
import com.huarui.company.dao.ICertifyDao;
import com.huarui.company.model.Certify;
import com.huarui.company.model.CertifyListModel;

public class CertifyDaoImpl extends BaseDaoImpl implements ICertifyDao  {

	@SuppressWarnings("unchecked")
	@Override
	public Certify getCertify(Integer companyId,Integer requestRealType) {
		
		Map map = new HashMap();
		map.put("companyId", companyId);
		map.put("requestRealType",requestRealType);
		return (Certify)this.getSqlMapClientTemplate().queryForObject(namespace+".getcertifyByCompanyId",companyId);
	}


	@SuppressWarnings("unchecked")
	@Override
	public List<Certify> getCertifies(CertifyListModel certifyListModel) {

		return (List<Certify>)this.getSqlMapClientTemplate().queryForList(namespace+".queryAll",certifyListModel);
	}

	
	public int countByConditions(CertifyListModel certifyListModel) {

		return (Integer) getSqlMapClientTemplate().queryForObject(namespace + ".countByConditions", certifyListModel);
	}
	
}
